package com.simou.service;

import com.simou.dao.ProviderMapper;
import com.simou.pojo.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ProviderServiceImpl implements ProviderService{
    @Autowired
    ProviderMapper providerMapper;

    @Override
    public List<Provider> getProvidersByLimit(int start, int pageSize, String proCode, String proName) {
        return providerMapper.getProvidersByLimit(start, pageSize, proCode, proName);
    }

    @Override
    public int getProvidersCount(String proCode, String proName) {
        return providerMapper.getProvidersCount(proCode, proName);
    }

    @Override
    public int addProvider(Provider provider) {
        return providerMapper.addProvider(provider);
    }

    @Override
    public int updateProvider(long proid, Provider provider) {
        return providerMapper.updateProvider(proid, provider);
    }

    @Override
    public int deleteProvider(long proid) {
        return providerMapper.deleteProvider(proid);
    }
}
